﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            // 变量声明与数据类型
            int age = 20;
            string name = "张三";
            double salary = 50000.5;

            //条件语句
            if (age > 18)
            {
                Console.WriteLine("成年人");

            }
            else
            {
                Console.WriteLine("未成年");

            }

            for (int i = 0; i < 5; i++)
            {
                Console.WriteLine(i);
            }

            Greet("张三");
        }
        ////方法定义与调用
        public static void Greet(string name)
        {
            Console.WriteLine($"你好，我是{name}");
        }
       
    }
}
